#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
    int a, b;
    scanf("%d %d", &a, &b);
    int c = a ^ b;
    int sum = 0;
    while (c) {
        c &= c - 1;
        sum++;
    }
    printf("%d", sum);
    return 0;
}   